<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ page contentType="text/html;charset=UTF-8" %>
<%@page import="com.lmpop.trade.ts_custclass.*" %>
<%@page import="java.util.*" %>
<%@page import="com.lmpop.frame.util.PageTools" %>
<%
	request.setCharacterEncoding("UTF-8");
	Map ts_custclass = new Hashtable();
	String search_cust_class = "",search_cust_class_name="";
	if(request.getParameter("s_cust_class")!=null && !request.getParameter("s_cust_class").equals("")){
		search_cust_class = request.getParameter("s_cust_class");
		ts_custclass.put("cust_class",search_cust_class);
	}
	if(request.getParameter("s_cust_class_name")!=null && !request.getParameter("s_cust_class_name").equals("")){
		search_cust_class_name = request.getParameter("s_cust_class_name");
		ts_custclass.put("cust_class_name",search_cust_class_name);
	}
	Ts_custclassInfo ts_custclassInfo = new Ts_custclassInfo();
	String iStart = "0";
	int limit = 20;
	if(request.getParameter("iStart")!=null) iStart = request.getParameter("iStart");
	List list = ts_custclassInfo.getListByPage(ts_custclass,Integer.parseInt(iStart),limit);
	int counter = ts_custclassInfo.getCountByObj(ts_custclass);
	String pageString = new PageTools().getGoogleToolsBar(counter,"index.jsp?s_cust_class_name="+search_cust_class_name+"&s_cust_class="+search_cust_class+"&iStart=",Integer.parseInt(iStart),limit);
	String para ="s_cust_class_name="+search_cust_class_name+"&s_cust_class="+search_cust_class+"&iStart="+Integer.parseInt(iStart);
%>
<html>
  <head>
    
    <title>企业级别管理</title>
	<link href="/program/admin/index/css/style.css" rel="stylesheet" type="text/css">
	<script type="text/javascript" src="/js/commen.js"></script>
	<script type="text/javascript" src="js_search.js"></script>
</head>

<body>
	<table width="100%" cellpadding="0" cellspacing="0" border="0">
		<tr>
			<td width="90%">
				<h1>企业级别管理</h1>
			</td>
			<td>
				<a href="addInfo.jsp"><img src="/program/admin/index/images/post.gif" /></a>
			</td>
		</tr>
	</table>
	
	<form action="index.jsp" name="indexForm" method="post">
	
	

	
	  
	<table width="100%" cellpadding="0" cellspacing="0" class="dl_su">
		<tr>
			<td align="left" >
			级别编码:<input name="s_cust_class" id = "s_cust_class" type="text" />&nbsp;
			级别名称:<input name="s_cust_class_name" id = "s_cust_class_name" type="text" />

		<input name="searchInfo" type="button" onclick="searchForm()" value="查询"/>	
			</td>
		</tr>
	</table>

	<table width="100%" cellpadding="0" cellspacing="0" border="0" class="tablehe">
		<tr><td><%=pageString %></td></tr>
	</table>
	
	<% 
		int listsize = 0;
		if(list!=null && list.size()>0){
			listsize = list.size();
	%>
	
	<table width="100%" cellpadding="0" cellspacing="0" border="0" class="dl_bg">
		<tr>
			<td width="90%">
				<input type="button" name="delInfo" onclick="delIndexInfo()" value="删除" class="buttab"/>
			</td>
			<td>
				总计:<%=counter %>条
			</td>
		</tr>
	</table>
	
	<table width="100%" cellpadding="1" cellspacing="1" class="listtab" border="0">
		<tr>
			<th width="5%" align="center"><input type="checkbox" name="checkall" id="checkall" onclick="selectAll()"></th>
			
		  	<th>级别编码</th>
		  	
		  	<th>级别名称</th>
		  	
		  	<th>编辑时间</th>
			
			<th width="10%">编辑权限</th>
			<th width="10%">修改</th>
	  		<th width="10%">删除</th>
		</tr>
		
		
		<% 
		  		for(int i=0;i<list.size();i++){
		  			Hashtable map = (Hashtable)list.get(i);
		  			String cust_class="",cust_class_name="",cust_oper_person="",cust_oper_date="",remark="";
		  			  	if(map.get("cust_class")!=null) cust_class = map.get("cust_class").toString();
  	if(map.get("cust_class_name")!=null) cust_class_name = map.get("cust_class_name").toString();
  	if(map.get("cust_oper_person")!=null) cust_oper_person = map.get("cust_oper_person").toString();
  	if(map.get("cust_oper_date")!=null) cust_oper_date = map.get("cust_oper_date").toString();
if(cust_oper_date.length()>19)cust_oper_date=cust_oper_date.substring(0,19);
  	if(map.get("remark")!=null) remark = map.get("remark").toString();

		  %>
		
		<tr>
			<td width="5%" align="center"><input type="checkbox" name="checkone<%=i %>" id="checkone<%=i %>" value="<%=cust_class %>" /></td>
			
			
			<td><%=cust_class%></td>
			
		  	<td><%=cust_class_name%></td>
		  		  	
		  	<td><%=cust_oper_date%></td>
		  	
			<td width="10%"><a href="/program/admin/rightinfo/addInfo.jsp?cust_class=<%=cust_class %>&<%=para%>&classtype=c"><img src="/program/admin/images/edit.gif" title="编辑" /></a></td>
			<td width="10%"><a href="updateInfo.jsp?cust_class=<%=cust_class %>&<%=para%>"><img src="/program/admin/images/edit.gif" title="修改" /></a></td>
	  		<td width="10%"><a href="javascript:deleteOneInfo('<%=cust_class%>','6089');"><img src="/program/admin/images/delete.gif" title="删除" /></a></a></td>
		</tr>
		
		  <%
		  		}
		  %>
		
	</table>
	
	<table width="100%" cellpadding="0" cellspacing="0" border="0" class="dl_bg">
		<tr>
			<td width="90%">
				<input type="button" name="delInfo" onclick="delIndexInfo()" value="删除" class="buttab"/>
			</td>
			<td>
				总计:<%=counter %>条
			</td>
		</tr>
	</table>
	<table width="100%" cellpadding="0" cellspacing="0" border="0" class="tablehe">
		<tr><td><%=pageString %></td></tr>
	</table>
	
	<%
		 }
	%>
	
	  <input type="hidden" name="listsize" id="listsize" value="<%=listsize %>" />
	  <input type="hidden" name="pkid" id="pkid" value="" />
	  <input type="hidden" name="bpm_id" id="bpm_id" value="6089" />
	  </form>
</body>

</html>
